package com.test.sdk.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.test.sdk.common.pojo.OnlineUser;
import com.test.sdk.dao.OnlineDAO;
import com.test.sdk.service.service.OnlineService;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class OnlineServiceImpl implements OnlineService {
    @Autowired
    private OnlineDAO onlineDAO;

    @Override
    public void addOnlineUser(OnlineUser user) {
        onlineDAO.addOnlineUser(user);
    }

    @Override
    public void deleteTicketByUserId(Integer userId) {
        onlineDAO.deleteTicketByUserId(userId);
    }

    @Override
    public void updateLastAct(String ticket) {
        onlineDAO.updateLastAct(ticket);
    }

    @Override
    public OnlineUser getOnlineUser(String ticket) {
        return onlineDAO.getOnlineUser(ticket);
    }
}
